import selenium, unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from Page import Page
from Page2 import Page2
from Page3 import Page3


class Test(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Edge()

    def tearDown(self) -> None:
        time.sleep(10)
        self.driver.quit()

    def test_login(self):
        po = Page(self.driver)
        po.open_url('http://localhost:8080/userlogin')
        po.dl_lj1()

    def test_tianjia2(self):
        po = Page2(self.driver)
        po.open_url('http://localhost:8080/borrowlist')
        po.tj_lj2()

    def test_tianjia3(self):
        po = Page3(self.driver)
        po.open_url('http://localhost:8080/booklist')
        po.tj_lj3()


if __name__ == '__main__':
    unittest.main()
